package com.ley.springboot.seed.controller;

import com.ley.springboot.seed.utils.web.result.Result;
import com.ley.springboot.seed.utils.web.result.ResultCode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(value = "Index Controller", description = "Index Controller")
@RequestMapping("/api/index")
public class IndexController {

    @GetMapping("/hello")
    @ApiOperation("Hello Index")
    public Result<String> index() {
        int i = 1 / 0;
        Result<String> result = new Result<>();
        result.setCode(ResultCode.SUCCESS);
        return result;
    }
}
